/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #6a89cc;
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin-bottom: 10px;
    font-size: 2.2rem;
}

.date-display {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 主内容区域 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

/* 表单样式 */
.task-form {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.task-form h2 {
    margin-bottom: 20px;
    color: #4a69bd;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.task-form button {
    width: 100%;
    padding: 12px;
    background-color: #4a69bd;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.task-form button:hover {
    background-color: #1e3799;
}

/* 任务列表样式 */
.tasks-list {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tasks-list h2 {
    margin-bottom: 20px;
    color: #4a69bd;
    font-size: 1.5rem;
}

.filter-options {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 15px;
    background-color: #e0e0e0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    background-color: #4a69bd;
    color: white;
}

.tasks-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.task-card {
    background-color: #f8f9fa;
    border-left: 5px solid #4a69bd;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.task-card.completed {
    border-left-color: #38b2ac;
    opacity: 0.8;
}

.task-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.task-time {
    display: inline-block;
    background-color: #4a69bd;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.task-card.completed .task-time {
    background-color: #38b2ac;
}

.task-description {
    margin-bottom: 20px;
    color: #666;
}

.task-actions {
    display: flex;
    justify-content: space-between;
}

.task-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.complete-btn {
    background-color: #38b2ac;
    color: white;
}

.complete-btn:hover {
    background-color: #2c9c94;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
}

.delete-btn:hover {
    background-color: #c0392b;
}

.task-card.completed .complete-btn {
    background-color: #b8c2cc;
    cursor: not-allowed;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px 0;
    color: #999;
    grid-column: 1 / -1;
}

.empty-state p {
    margin-top: 10px;
    font-size: 1.1rem;
}

/* 响应式设计 */
@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .task-form,
    .tasks-list {
        padding: 15px;
    }
    
    .tasks-container {
        grid-template-columns: 1fr;
    }
}